package main

import "fmt"

type I interface {
	M()
}

type T struct{}

func (T) M() {}

func main() {
	var t T
	var i I = t

	switch i.(type) {
	case T:
		fmt.Println("it is type T")
	case int: // i (variable of interface type I) cannot have dynamic type int (missing method M)
		fmt.Println("it is type int")
	}

}
